package com.sdry.approval.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sdry.approval.entity.ForMySponsor;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

public interface ForMySponsorMapper extends BaseMapper<ForMySponsor> {

    /**
     * 更改状态
     * @param requestType
     * @param requestId
     * @param userId
     * @param status
     * @return
     */
    @Update("update for_my_sponsor set complete_status = #{status} , complete_date = GETDATE() where user_id = #{userId} and request_id = #{requestId} and request_type = #{requestType}")
    Integer updateForMy(@Param("requestType") String requestType, @Param("requestId") Long requestId, @Param("userId") Long userId, @Param("status") String status);
}
